import java.util.Arrays;
import java.util.Scanner;
public class Remove_Element {
    public void remove(int[]array,int k){

        int n = 0;
        int s = 0;
        for (int value : array) {
            if (value != k) {
                n++;
            }
        }
        int[] arrs = new int[n];
        for (int j : array) {
            if (j != k) {
                arrs[s++] = j;
            }
        }
        System.out.print(n+","+"nums = ");
        System.out.print(Arrays.toString(arrs));
    }

    public static void main(String[] args) {
        int[] arr = {1,1,2,9,6,1,4,2,3,1};
        Scanner scanner = new Scanner(System.in);
        int k = scanner.nextInt();
        Remove_Element R = new Remove_Element();
        R.remove(arr,k);
    }
}
